import PyPDF2

file = open("Python标准库示例.pdf",'rb')
pdfObj = PyPDF2.PdfReader(file)
print(len(pdfObj.pages))
page = pdfObj.pages[2]
print(page.extract_text())